from django.contrib import admin
from .models import *

admin.site.register(User)

# Register your models here.
# admin.site.register(Permission)


# 定义一个模型类的管理类
class PermissionManager(admin.ModelAdmin):
    list_display = ['id', 'name', 'code_name', 'type_name']
    list_display_links = ['id', ]
    list_editable = ['name', 'code_name']
    list_filter = ['type_name']
    search_fields = ['type_name']


# 注册模型类
admin.site.register(Permission, PermissionManager)